<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>GraphChi: file_logger Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GraphChi
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">file_logger Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="logger_8hpp_source.html">logger.hpp</a>&gt;</code></p>

<p><a href="classfile__logger-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afd49e36dd0cb905b9c8de05ec38eec5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#afd49e36dd0cb905b9c8de05ec38eec5b">set_log_to_console</a> (bool consolelog)</td></tr>
<tr class="memdesc:afd49e36dd0cb905b9c8de05ec38eec5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">If consolelog is true, subsequent logger output will be written to stderr.  <a href="#afd49e36dd0cb905b9c8de05ec38eec5b"></a><br/></td></tr>
<tr class="memitem:ab1ac2156591d7b04d2d1bfbaf3eb4a69"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1ac2156591d7b04d2d1bfbaf3eb4a69"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#ab1ac2156591d7b04d2d1bfbaf3eb4a69">get_log_file</a> (void)</td></tr>
<tr class="memdesc:ab1ac2156591d7b04d2d1bfbaf3eb4a69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current logger file. <br/></td></tr>
<tr class="memitem:acded5e9c6a2b21dfec2c889a9d0e5efd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acded5e9c6a2b21dfec2c889a9d0e5efd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#acded5e9c6a2b21dfec2c889a9d0e5efd">get_log_to_console</a> ()</td></tr>
<tr class="memdesc:acded5e9c6a2b21dfec2c889a9d0e5efd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if output is being written to stderr. <br/></td></tr>
<tr class="memitem:a7e8dbb4fe48aa0983271e50e00406a2e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e8dbb4fe48aa0983271e50e00406a2e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#a7e8dbb4fe48aa0983271e50e00406a2e">get_log_level</a> ()</td></tr>
<tr class="memdesc:a7e8dbb4fe48aa0983271e50e00406a2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current logger level. <br/></td></tr>
<tr class="memitem:a1af6d913dc8fa9bcad436909c1067414"><td class="memTemplParams" colspan="2"><a class="anchor" id="a1af6d913dc8fa9bcad436909c1067414"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a1af6d913dc8fa9bcad436909c1067414"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classfile__logger.html">file_logger</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><b>operator&lt;&lt;</b> (T a)</td></tr>
<tr class="memitem:a74af3648c42696b41fcc1f62d6bba3fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74af3648c42696b41fcc1f62d6bba3fa"></a>
<a class="el" href="classfile__logger.html">file_logger</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (const char *a)</td></tr>
<tr class="memitem:ad3753bbbe5e96733b7cf552442337ecc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3753bbbe5e96733b7cf552442337ecc"></a>
<a class="el" href="classfile__logger.html">file_logger</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;(*f)(std::ostream &amp;))</td></tr>
<tr class="memitem:a21330e11d0d392e86d8d928e9408a4f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#a21330e11d0d392e86d8d928e9408a4f1">set_log_level</a> (int new_log_level)</td></tr>
<tr class="memitem:a97b486960a56b3ca3bc657cfa9645cc9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfile__logger.html#a97b486960a56b3ca3bc657cfa9645cc9">file_logger</a> ()</td></tr>
<tr class="memitem:abe325ad2b332c007e73053f111ff001b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abe325ad2b332c007e73053f111ff001b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>set_log_file</b> (std::string file)</td></tr>
<tr class="memitem:a6856b30bc36281bac53a3fef8b9baccc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6856b30bc36281bac53a3fef8b9baccc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>textcolor</b> (FILE *handle, int attr, int fg)</td></tr>
<tr class="memitem:a8af1687ded9a0c178be3ec9b88d59e48"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8af1687ded9a0c178be3ec9b88d59e48"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>reset_color</b> (FILE *handle)</td></tr>
<tr class="memitem:a7de028f6b436a6bc0ae84df2d6aa9de7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7de028f6b436a6bc0ae84df2d6aa9de7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>_log</b> (int lineloglevel, const char *file, const char *function, int line, const char *fmt, va_list ap)</td></tr>
<tr class="memitem:ae811969922f3ba1010309bcea33e6866"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae811969922f3ba1010309bcea33e6866"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>_logbuf</b> (int lineloglevel, const char *file, const char *function, int line, const char *buf, int len)</td></tr>
<tr class="memitem:ae6b57d652cdaf6c137533e5bac57b835"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6b57d652cdaf6c137533e5bac57b835"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>_lograw</b> (int lineloglevel, const char *buf, int len)</td></tr>
<tr class="memitem:a4c6deb7527f95f1786f2c4f4501a49b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c6deb7527f95f1786f2c4f4501a49b7"></a>
<a class="el" href="classfile__logger.html">file_logger</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>start_stream</b> (int lineloglevel, const char *file, const char *function, int line)</td></tr>
<tr class="memitem:a5f8d88ab1aa1db76958edf175edc7c06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f8d88ab1aa1db76958edf175edc7c06"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>stream_flush</b> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a974b6ccd8179876cbe05fec8e0df0bb8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a974b6ccd8179876cbe05fec8e0df0bb8"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>streambuffdestructor</b> (void *v)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>logging class. This writes to a file, and/or the system console. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a97b486960a56b3ca3bc657cfa9645cc9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">file_logger::file_logger </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Default constructor. By default, log_to_console is off, there is no logger file, and logger level is set to LOG_WARNING </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a21330e11d0d392e86d8d928e9408a4f1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void file_logger::set_log_level </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>new_log_level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the current logger level. All logging commands below the current logger level will not be written. </p>

</div>
</div>
<a class="anchor" id="afd49e36dd0cb905b9c8de05ec38eec5b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void file_logger::set_log_to_console </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>consolelog</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>If consolelog is true, subsequent logger output will be written to stderr. </p>
<p>Closes the current logger file if one exists. if 'file' is not an empty string, it will be opened and all subsequent logger output will be written into 'file'. Any existing content of 'file' will be cleared. Return true on success and false on failure. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/logger/<a class="el" href="logger_8hpp_source.html">logger.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 5 2012 00:11:19 for GraphChi by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
